// callback: cmd_set

// set variables
// fixme! add to show and check
void cmd_set(istringstream& ss) {
  string what;
  ss>>what;
  if(what=="timestep") {
    double dt;
    ss>>dt;
    fd[current]->solver->SetTimestep(dt);
  }
  else if(what=="source") fd[current]->src.append(getall(ss));
  else if(what=="con") fd[current]->con.append(getall(ss));
  else if(what=="cap") fd[current]->cap.append(getall(ss));
  
  else if(what=="out") {
    if(me==0) {
      string a,oname;
      if(ss>>a) {
        int cid=search_fd(a);
        if(cid<0) {cid=current;oname=a;}
        else if(!(ss>>oname)) throw "filename required";
        if(fd[current]->output.is_open()) fd[current]->output.close();
        else fd[current]->output.open(oname.c_str());
      }
    }
  }
  
  else {
    /*
    int p=what.find('=');
    if(p==what.npos) throw "invalid set command";
    
    istringstream sss(replace_char(what,'=',' '));
    if(sss>>vname>>val) ...
    */
    throw "not implemented yet";
    
  }
}
